package com.macro.mall.portol.Service.Impl;

import com.macro.mall.portol.Service.PortalService;
import com.macro.mall.portol.mapper.OmsOrderReturnApplyMapper;
import com.macro.mall.portol.model.OmsOrderReturnApply;
import com.macro.mall.portol.vo.OmsOrderReturnApplyParam;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.Date;

@Service
public class PortalServiceApp implements PortalService {

    @Autowired
    private OmsOrderReturnApplyMapper returnApplyMapper;

    @Override
    public int create(OmsOrderReturnApplyParam ApplyParam) {
        OmsOrderReturnApply realApply=new OmsOrderReturnApply();
        BeanUtils.copyProperties(ApplyParam,realApply);
        realApply.setCreateTime(new Date());
        realApply.setStatus(0);
        return returnApplyMapper.insert(realApply);
    }
}
